import { ref } from "vue"
import type pageTable from "@/components/page-table"

export function usePageSearch(): any {
  const pageTableRef = ref<InstanceType<typeof pageTable>>()
  // 重置
  const reset = () => {
    pageTableRef.value?.GetPageInfo()
    console.log("点击了重置")
  }
  // 搜索
  const search = (formData: any) => {
    pageTableRef.value?.GetPageInfo(formData)
    console.log(formData)
  }
  return [pageTableRef, reset, search]
}
